package com.igeek.boot.servlet;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * @Author fengqq
 * @Description TODO
 * @Date 2024/8/19  15:50
 *
 */
//@WebListener
public class MyListener implements ServletContextListener {

    public MyListener() {
        System.out.println("MyListener 调用构造方法");
    }

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("MyListener tomcat容器的创建");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("MyListener tomcat容器的销毁");
    }
}
